//
//  Book.m
//  FRP_OC
//
//  Created by DeLongYang on 2017/10/31.
//  Copyright © 2017年 DeLongYang. All rights reserved.
//

#import "Book.h"

@implementation Book

+ (Book *)bookWithDic:(NSDictionary *)dic
{
    Book *book = [[Book alloc] init];
    if (dic) {
    
        if (dic[@"title"]) {
            book.title = dic[@"title"];
        }
        
        if (dic[@"subtitle"]) {
            book.subtitle = dic[@"subtitle"];
        }
    }
    return book;
}

@end
